package com.sixth.exceptionhandler;

import com.sixth.bean.common.BaseRespVo;
import org.apache.shiro.authc.UnknownAccountException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @ClassName UnknownAccountExceptionAdvice
 * @Description TODO
 * @Author XiaoWJ
 * @Date 2022/9/12 14:51
 **/
@RestControllerAdvice
public class UnknownAccountExceptionAdvice {

    // UnknownAccountException类型的异常都会到这里处理
    @ExceptionHandler(UnknownAccountException.class)
    public BaseRespVo unknownAccountExceptionResolve (UnknownAccountException exception) {

        return BaseRespVo.noLogin();

    }

}
